package org.linlinjava.litemall.db.jsonfield;

public class LitemallGoodsProductSpecification {
    private Integer id;
    private String name;
    private Integer infoId;
    private String infoName;

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    private String picUrl;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getInfoId() {
        return infoId;
    }

    public void setInfoId(Integer infoId) {
        this.infoId = infoId;
    }

    public String getInfoName() {
        return infoName;
    }

    public void setInfoName(String infoName) {
        this.infoName = infoName;
    }

    @Override
    public boolean equals(Object obj) {
        if(obj==null){
            return false;
        }
        if(this==obj){
            return true;
        }
        if(obj instanceof LitemallGoodsProductSpecification){
            LitemallGoodsProductSpecification specification=(LitemallGoodsProductSpecification)obj;
            if(specification.id.equals(this.id)&&specification.name.equals(this.name)&&
                    specification.getInfoId().equals(this.infoId)&&specification.getInfoName().equals(this.infoName)){
                return true;
            }else{
                return false;
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        StringBuilder sb = new StringBuilder();
        sb.append(id);
        sb.append(name);
        sb.append(infoId);
        sb.append(infoName);
        char[] charArr = sb.toString().toCharArray();
        int hash = 0;

        for(char c : charArr) {
            hash = hash * 131 + c;
        }
        return hash;
    }
}
